<template>
    <a-layout id="components-layout-demo-custom-trigger" theme="light">
        <LayoutSider
            :collapsed="collapsed"
            @routePath="routerPath"
        ></LayoutSider>
        <a-layout :class="[collapsed ? 'noFixedLayout' : 'fixedLayout']">
            <a-layout-header id="header">
                <a-icon
                    class="trigger"
                    :type="collapsed ? 'menu-unfold' : 'menu-fold'"
                    @click="() => (collapsed = !collapsed)"
                />

                <router-link to="/">关于</router-link> |
                <router-link to="/about">个人</router-link>
            </a-layout-header>
            <!-- <Breadcrumbs></Breadcrumbs> -->
            <a-layout-content
                :style="{
                    margin: '24px 16px',
                    padding: '24px',
                    background: '#fff',
                    minHeight: '280px',
                }"
            >
                <LayoutContext></LayoutContext>
            </a-layout-content>
            <a-layout-footer>
                <Footer></Footer>
            </a-layout-footer>
        </a-layout>
    </a-layout>
</template>
<script lang="ts">
import Vue from 'vue';

import { Component, Prop, Watch } from 'vue-property-decorator';
import LayoutSider from '@/layouts/layoutSider/LayoutSider.vue';
import Footer from '@/layouts/layoutFooter/LayoutFooter.vue';
import LayoutContext from '@/layouts/layoutContext/LayoutContext.vue';
// import Breadcrumbs from '@/components/Breadcrumbs.vue';
@Component({
    components: {
        LayoutSider,
        LayoutContext,
        Footer,
        // Breadcrumbs,
    },
})
export default class BaseLayout extends Vue {
    private collapsed: boolean = false;

    private routerPath(routePath: string) {
        this.$router.push({ path: routePath });
    }
}
</script>
<style>
#components-layout-demo-custom-trigger .trigger {
    font-size: 18px;
    line-height: 64px;
    padding: 0 24px;
    cursor: pointer;
    transition: color 0.3s;
}
#header {
    background: #fff;
    padding: 0;
    text-align: left;
}

#components-layout-demo-custom-trigger .trigger:hover {
    color: #1890ff;
}

#components-layout-demo-custom-trigger .logo {
    height: 32px;
    /* background: rgba(22, 20, 20, 0.2); */
    margin: 16px;
    color: black;
}
.fixedLayout {
    margin-left: 256px;
}
.noFixedLayout {
    margin-left: 86px;
}
</style>
